<template>
  <div>
    <el-table :data="tableData" stripe style="width: 100%">
      <el-table-column type="index" width="50" label="序号"></el-table-column>
      <el-table-column prop="hash.carno" label="牌照"></el-table-column>
      <el-table-column prop="hash.holder" label="司机"></el-table-column>
      <el-table-column prop="hash.recordtime" label="出行时间"></el-table-column>
      <el-table-column prop="hash.usedetail" label="出车用途"></el-table-column>
      <el-table-column prop="hash.useaddress" label="行车地点"></el-table-column>
      <el-table-column prop="hash.holder" label="同行人"></el-table-column>
    </el-table>
    <el-pagination @current-change="handleCurrentChange" :currentPage.sync="pagobj.currentPage3" :pageSize="pagobj.pagesize" layout="total, prev, pager, next" :total="pagobj.total" style="margin:20px 0;text-align:center"></el-pagination>
  </div>
</template>

<script>
export default {
  data () {
    return {};
  },
  props: {
    tableData: {
      type: Array,
      required: true,
    },
    pagobj: {
      type: Object,
      required: true,
    },
  },
  methods: {
    handleCurrentChange () {
      this.$parent.getrecord();
    },
  },
};
</script>

<style>
.cell {
  text-align: center;
}
</style>
